-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: handleRequest
. Deprecate onUnhandledRequest
middleware option
#340
feat: handleRequest
. Deprecate onUnhandledRequest
middleware option
#340
Conversation
Thanks for taking the time to make this PR ✨ What's the impact on the user of not being able to define an |
For reference, this was split from #333 In that PR it was mentioned:
|
Thanks! Do all of the current middleware use Express? Or would the pattern for doing that be different across middleware? For example, it doesn't look like the Lambda one uses Express. |
This is a great question! I believe the below behavior for the generic handler (aka
All middlewares naturally share the same pattern when dealing with
Does that make sense? If not, may I know your use case? |
No. Hence the If I recall correctly, I think we depend on |
I understand that. That’s exactly why this PR is proposed.
Thanks for that information. I believe First, I suggest all the middlewares (the cartesian product of [
Second, injecting the Making middlewares idiomatic is more important than unifying the interface. A more functional approach (#341) makes Deno / Cloudflare / AWS Lambda feels better, IMHO. |
feat(middleware): export `handleRequest`, `OctokitRequest`, and `OctokitResponse` for 3rd-party middlewares
e6baaf1
to
cc32524
Compare
onUnhandledRequest
middleware optiononUnhandledRequest
middleware option
onUnhandledRequest
middleware optionhandleRequest
. Deprecate onUnhandledRequest
middleware option
3f5535a
to
720032b
Compare
1. Parse the HTTP request using (1). | ||
2. Process the `OctokitRequest` object using `handleRequest`. | ||
3. Render the `OctokitResponse` object using (2). | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
beautiful, thank you!!!
🎉 This PR is included in version 4.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 5.0.0-beta.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
To:
this PR deprecates the
onUnhandledRequest
option.Without the
onUnhandledRequest
option, middlewares are simpler and more idiomatic, which can be verified in my next PR #341.